{subtemplate header}

<style>
	
	
</style>
<div id="subheader">
	<div class="wrap">
		<div id="sh_body">
			<h1>$forum[name]</h1>
			<div id="nav"><a href="$indexname">$bbname</a> $navigation</div>
		</div>
		<div id="sh_side">
			<div class="postbtn">
				<a href="post.php?action=newthread&fid=$fid" onclick="floatwin('open_newthread', this.href, 600, 410, '600,0');return false;" id="newspecial" onmouseover="showMenu(this.id)"><em><span>{lang post_newthread}</span></em></a>
			</div>
		</div>
	</div>
</div>

<!--{if !empty($announcement)}-->
<div id="ann">
	<div class="wrap">
		<a href="#" class="more">MORE</a>
		<dl>
			<dt class="label_c"><strong>{lang announcement}</strong></dt>
			<dd>
				<ul id="annbodylis">
					<li><!--{if empty($announcement['type'])}--><a href="announcement.php?id=$announcement[id]#$announcement[id]" target="_blank">$announcement[subject]<em>$announcement[starttime]</em></a><!--{else}--><a href="$announcement[message]" target="_blank">$announcement[subject]<em>$announcement[starttime]</em></a><!--{/if}--></li>
				</ul>
			</dd>
		</dl>
	</div>
</div>
<!--{/if}-->

<div id="wrap" class="wrap s_clear">
<div class="main">
	<div class="content">
		<!--{if $admode && empty($insenz['hardadstatus']) && !empty($advlist['text'])}-->
		<div id="ad_text" class="ad_text" >
			<table summary="Text Ad" cellpadding="0" cellspacing="0">$advlist[text]</table>
		</div>
		<!--{else}-->
		<div id="ad_text"></div>
		<!--{/if}-->
		
		<style>
			#modarea { margin-bottom: 1em; padding-bottom: 1em; border-bottom: 2px solid #C0C0C0; font-size: 12px; line-height: 1.5em; }
				#modarea p { padding-top: 8px; }
				#modarea li { list-style: inside disc; color: #4DA400; }
					#modarea li cite, #modarea li cite a { margin-left: 5px; color: #999; }
		</style>
		<!--{if $forum[description] || $forum['recommendlist'] || $forum['rules']}-->
			<div id="modarea">
				<!--{if $forum[description]}--><p><strong>{lang forum_description}</strong>: $forum[description]</p><!--{/if}-->
				<!--{if $forum['rules']}--><p><strong>{lang forum_rules}</strong>: $forum[rules]</p><!--{/if}-->
				<!--{if $forum['recommendlist']}-->
					<p><strong>{lang forum_recommend}</strong></p>
					<ul>
					<!--{loop $forum['recommendlist'] $tid $thread}-->
						<li class="wide"><a href="viewthread.php?tid=$tid" $thread['subjectstyles'] target="_blank">$thread[subject]</a><cite>-<a href="space.php?uid=$thread[authorid]" target="_blank">$thread[author]</a></cite></li>
					<!--{/loop}-->
					</ul>
				<!--{/if}-->
			</div>
		<!--{/if}-->

		<!--{if $subexists}-->
		<div id="subforum" class="mainbox list">{template forumdisplay_subforum}</div>
		<!--{/if}-->
		
		<style>
			#threadlist li { width: 100%; padding-top: 8px; height: 32px; }
				.threadnums { float: left; margin-right: 10px; padding: 0; width: 32px; height: 32px; background: #E8F3F7; font-family: Tahoma, Helvetica, Arial, serif; font-size: 8px; color: #999; font-family: Helvetica,Arial,sans-serif; text-align: center; cursor: help; }
					.new .threadnums { background: #EC5810; color: #FFF; }
					.hot .threadnums { background: #C62700; color: #FFF; }
						.new .threadnums strong, .hot .threadnums strong { color: #FFF; }
					.lock .threadnums { background: #F2F2F2 url({IMGDIR}/locked.png) no-repeat 0 0; }
					.pin .threadnums { background: #E8F3F7 url({IMGDIR}/pin.png) no-repeat 0 0; }
					.threadnums strong { display: block; padding-top: 5px; font-size: 14px; font-weight: bold; color: #333; line-height: 14px; }
					.threadnums em { line-height: 8px; }
				.subject { float: left; width: 583px; height: 32px; border-bottom: 1px solid #EEE; background: url({IMGDIR}/mini_arw.png) no-repeat 100% 6px; font-weight: normal; line-height: 30px; }
					li:hover .subject { background-position: 100% -87px; }
					.subject .extra { font-size: 12px; color: #999; }
					.subject img { margin-bottom: -3px; cursor: help; }
				.author { float: right; width: 120px; height: 32px; border-bottom: 1px solid #EEE; line-height: 1.5em; }
					.author cite { display: block; }
				.threadpages { font-size: 12px; }
					.threadpages a { padding: 0 3px; }
		</style>
		<div id="threadlist" class="list" style="position: relative;">
		<form method="post" name="moderate" id="moderate" action="topicadmin.php?action=moderate&fid=$fid&infloat=yes&nopost=yes">
			<input type="hidden" name="formhash" value="{FORMHASH}" />
			<input type="hidden" name="listextra" value="$extra" />
			
			<ul>

				<!--{if $threadcount}-->
				
				<!--{loop $threadlist $key $thread}-->

				<li id="$thread[id]" {if in_array($thread['displayorder'], array(4, 5))}style="display: none"{/if} class="s_clear {if $thread[folder] == 'lock'}lock{elseif in_array($thread['displayorder'], array(1, 2, 3))}pin{else}$thread[folder]{/if}">
					<p class="threadnums radius5" title="{if $thread[folder] == 'lock'}{lang mod_access_ban_postreply}{elseif in_array($thread['displayorder'], array(1, 2, 3))}{lang thread_stick}{elseif $thread[folder]=='new'}{lang thread_newposts}{else}{lang replies}:$thread[replies]/{lang views}:$thread[views]{/if}"><strong>$thread[replies]</strong><em>$thread[views]</em><p>
					<h2 class="subject">
						<!--{if $forum['ismoderator']}-->
							<!--{if $thread['fid'] == $fid && $thread['digest'] >= 0}-->
								<input onclick="modclick(this)" class="checkbox" type="checkbox" name="moderate[]" value="$thread[tid]" />
							<!--{else}-->
								<input class="checkbox" type="checkbox" disabled="disabled" />
							<!--{/if}-->
						<!--{/if}-->
							
						<!--{if $thread['special'] == 1}-->
							<a href="forumdisplay.php?fid=$fid&amp;filter=poll" class="thread_label label_poll">{lang thread_poll}</a>
						<!--{elseif $thread['special'] == 2}-->
							<a href="forumdisplay.php?fid=$fid&amp;filter=trade" class="thread_label label_trade">{lang thread_trade}</a>
						<!--{elseif $thread['special'] == 3}-->
							<a href="forumdisplay.php?fid=$fid&amp;filter=reward" class="thread_label label_reward <!--{if $thread['price'] < 0}-->solved<!--{/if}-->">{lang thread_reward}</a>
						<!--{elseif $thread['special'] == 4}-->
							<a href="forumdisplay.php?fid=$fid&amp;filter=activity" class="thread_label label_activity">{lang thread_activity}</a>
						<!--{elseif $thread['special'] == 5}-->
							<a href="forumdisplay.php?fid=$fid&amp;filter=debate" class="thread_label label_debate">{lang thread_debate}</a>
						<!--{elseif $thread['special'] == 6}-->
							<a href="forumdisplay.php?fid=$fid&amp;filter=video" class="thread_label label_video">{lang thread_video}</a>
						<!--{/if}-->
$thread[sortid] $thread[typeid]
						<span id="thread_$thread[tid]"><a href="viewthread.php?tid=$thread[tid]&amp;extra=$extra"$thread[highlight]>$thread[subject]</a></span>

						<!--{if $thread['attachment'] == 2}-->
							<img src="{IMGDIR}/att_img.png" width="" height="" alt="{lang attach_img}" title="{lang attach_img}" />
						<!--{elseif $thread['attachment'] == 1}-->
							<img src="{IMGDIR}/att.png" width="16" height="16" alt="{lang attachment}" title="{lang attachment}" />
						<!--{/if}-->

						<!--{if $thread['rate'] > 0}-->
							<img src="{IMGDIR}/heart.png" width="16" height="16" alt="{lang rate_credit_add}" title="{lang rate_credit_add}" />
						<!--{/if}-->

						<!--{if $thread['digest'] > 0}-->
							<img src="{IMGDIR}/star.png" width="16" height="16" alt="{lang thread_digest} $thread[digest]" title="{lang thread_digest} $thread[digest]" />
						<!--{/if}-->
						
						<!--{if $thread['readperm']}--><span class="extra">{lang readperm}: $thread[readperm]</span><!--{/if}-->

						<!--{if $thread['price'] > 0}-->
							<!--{if $thread['special'] == '3'}-->
							<span class="extra">{lang thread_reward}: {$extcredits[$creditstransextra[2]][title]} $thread[price] {$extcredits[$creditstransextra[2]][unit]}</span>
							<!--{else}-->
							<span class="extra">{lang price}: {$extcredits[$creditstransextra[1]][title]} $thread[price] {$extcredits[$creditstransextra[1]][unit]}</span>
							<!--{/if}-->
						<!--{elseif $thread['special'] == '3' && $thread['price'] < 0}-->
							<span class="extra"><del>{lang reward_solved}</del></span>
						<!--{/if}-->
						
						<!--{if $thread[multipage]}-->
							<span class="threadpages">$thread[multipage]</span>
						<!--{/if}-->
						</h2>
						
						<p class="author">
							<cite>
							<!--{if $thread['authorid'] && $thread['author']}-->
								<a href="space.php?uid=$thread[authorid]">$thread[author]</a>
							<!--{else}-->
								<!--{if $forum['ismoderator']}-->
									<a href="space.php?uid=$thread[authorid]">{lang anonymous}</a>
								<!--{else}-->
									{lang anonymous}
								<!--{/if}-->
							<!--{/if}-->
							</cite>
							<em>$thread[dateline]</em>
						</p>
					</li>
				<!--{/loop}-->
			<!--{else}-->
				<tbody><tr><th><p class="nodata">{lang forum_nothreads}</p></th></tr></tbody>
			<!--{/if}-->
			</table>
			
			<!--{if $forum['ismoderator'] && $threadcount}-->
				{template topicadmin_modlayer}
			<!--{/if}-->

		</form>
		</div>
		$multipage
	</div>
</div>


<div id="sidebar" class="side">
	<div id="forumstats" class="sidebox">
		<h4>{lang modcp_forum}</h4>
		<ul>
			<li>{lang thread}: <em>$forum[threads]</em></li>
			<li>{lang reply}: <em>{echo $forum[posts]-$forum[threads]}</em></li>
			<li>{lang forum_modedby}: <!--{if $moderatedby}-->$moderatedby<!--{else}-->{lang forum_opening}<!--{/if}--></li>
		</ul>
		<ul>
			<a href="my.php?item=favorites&amp;fid=$fid" id="ajax_favorite" class="addfav" onclick="ajaxmenu(event, this.id)">{lang thread_favorite}</a>
			<!--{if $rssstatus}--><a href="rss.php?fid=$fid&amp;auth=$rssauth" target="_blank" class="feed">RSS</a><!--{/if}-->
			<a href="forumdisplay.php?fid=$fid&amp;filter=digest" target="_blank" class="digest">{lang forum_viewdigest}</a>
			<!--{if $adminid == 1 && $forum['recyclebin']}-->
				<a href="admincp.php?action=recyclebin&amp;frames=yes" target="_blank" class="recyclebin">{lang forum_recyclebin}</a>
			<!--{elseif $forum['ismoderator'] && $forum['recyclebin']}-->
				<a href="modcp.php?action=recyclebins&&amp;fid=$fid" target="_blank" class="recyclebin">{lang forum_recyclebin}</a>
			<!--{/if}-->
			<!--{if $forum['ismoderator']}-->
				<!--{if $forum['modworks']}-->
					<strong><a href="modcp.php?fid=$fid" target="_blank">{lang mod_works_existence}</a></strong>
				<!--{else}-->
					<strong><a href="modcp.php?fid=$fid" target="_blank">{lang modcp}</a></strong>
				<!--{/if}-->
			<!--{/if}-->
		</ul>
	</div>
	<hr />
	<!--{if $forum['threadtypes'] && $forum['threadtypes']['listable']}-->
	<div class="sidebox">
		<h4>{lang admin_type}</h4>
		<div class="threadtype s_clear">
			<!--{if $typeid || $sortid}--><a href="forumdisplay.php?fid=$fid" class="radius10">{lang forum_viewall}</a><!--{else}--><strong class="radius10">{lang forum_viewall}</strong><!--{/if}-->
			<!--{loop $forum['threadtypes']['flat'] $id $name}--><!--{if $typeid != $id}--><a href="forumdisplay.php?fid=$fid&amp;filter=type&amp;typeid=$id$sortadd" class="radius10">$name</a><!--{else}--><strong class="radius10">$name</strong><!--{/if}--><!--{/loop}-->
			<!--{if $forum['threadtypes']['selectbox']}-->
			<span id="threadtype_hidden" style="display: none;">
			<!--{loop $forum['threadtypes']['selectbox'] $id $name}-->
				<!--{if $typeid != $id}-->
					<a href="forumdisplay.php?fid=$fid&filter=type&typeid=$id$sortadd" class="radius10">$name</a>
				<!--{else}-->
					<strong class="radius10">$name</strong>
				<!--{/if}-->
			<!--{/loop}-->
			</span>
			<a href="javascript:;" class="radius10" onclick="$('threadtype_hidden').style.display='block';">{lang admin_type_more}...</a>
			<!--{/if}-->
		</div>
	</div>
	<hr />
	<!--{/if}-->
	
	<!--{if $forum['threadsorts'] && $forum['threadsorts']['listable']}-->
	<div class="sidebox">
		<h4>{lang threadtype_option}</h4>
		<ul>
			<li><!--{if !$forum['threadtypes']['listable']}--><!--{if $sortid}--><a href="forumdisplay.php?fid=$fid">{lang forum_viewall}</a><!--{else}--><strong>{lang forum_viewall}</strong><!--{/if}--><!--{/if}--></li>
			<!--{loop $forum['threadsorts']['flat'] $id $name}--><li><!--{if $sortid != $id}--><a href="forumdisplay.php?fid=$fid&amp;filter=sort&amp;sortid=$id$typeadd">$name</a><!--{else}--><strong>$name</strong><!--{/if}--></li><!--{/loop}-->
			<!--{if $forum['threadsorts']['selectbox']}-->
				<li><a href="javascript:;" id="threadsortsmenu" class="dropmenu" onmouseover="showMenu(this.id)">{lang admin_type_more}</li>
				<div class="popupmenu_popup" id="threadsortsmenu_menu" style="display: none">
				<ul>
				<!--{loop $forum['threadsorts']['selectbox'] $id $name}-->
					<li>
					<!--{if $sortid != $id}-->
						<a href="forumdisplay.php?fid=$fid&filter=sort&sortid=$id$typeadd">$name</a>
					<!--{else}-->
						<strong>$name</strong>
					<!--{/if}-->
					</li>
				<!--{/loop}-->
				</ul>
				</div>
				</li>
			<!--{/if}-->
		</p>
	</div>
	<hr />
	<!--{/if}-->
	
	<!--{if $infosidestatus[0]}-->
		<div id="infoside">
		{eval request($infosidestatus, 1, 0);}
		</div>
	<!--{/if}-->
	<!--{if $visitedforums}-->
	<div class="sidebox">
		<h4>{lang forum_jump}</h4>
		<ul>$visitedforums</ul>
	</div>
	<!--{/if}-->
</div>


<ul class="popupmenu_popup postmenu" id="newspecial_menu" style="display: none">
	<!--{if !$forum['allowspecialonly']}--><li><a href="post.php?action=newthread&fid=$fid" onclick="floatwin('open_newthread', this.href, 600, 410, '600,0');doane(event)">{lang post_newthread}</a></li><!--{/if}-->
	<!--{if $allowpostpoll || !$discuz_uid}--><li class="poll"><a href="post.php?action=newthread&fid=$fid&special=1">{lang post_newthreadpoll}</a></li><!--{/if}-->
	<!--{if $allowpostreward || !$discuz_uid}--><li class="reward"><a href="post.php?action=newthread&fid=$fid&special=3">{lang post_newthreadreward}</a></li><!--{/if}-->
	<!--{if $allowpostdebate || !$discuz_uid}--><li class="debate"><a href="post.php?action=newthread&fid=$fid&special=5">{lang post_newthreaddebate}</a></li><!--{/if}-->
	<!--{if $allowpostactivity || !$discuz_uid}--><li class="activity"><a href="post.php?action=newthread&fid=$fid&special=4">{lang post_newthreadactivity}</a></li><!--{/if}-->
	<!--{if $allowpostvideo || !$discuz_uid}--><li class="video"><a href="post.php?action=newthread&fid=$fid&special=6">{lang post_newthreadvideo}</a></li><!--{/if}-->
	<!--{if $allowposttrade || !$discuz_uid}--><li class="trade"><a href="post.php?action=newthread&fid=$fid&special=2">{lang post_newthreadtrade}</a></li><!--{/if}-->
	<!--{if $forum['threadsorts'] && !$forum['allowspecialonly']}-->
		<!--{loop $forum['threadsorts']['types'] $id $threadsorts}-->
			<!--{if $forum['threadsorts']['show'][$id]}-->
				<li class="popupmenu_option"><a href="post.php?action=newthread&amp;fid=$fid&amp;extra=$extra&amp;sortid=$id">$threadsorts</a></li>
			<!--{/if}-->
		<!--{/loop}-->
		<!--{loop $forum['typemodels'] $id $model}-->
			<li class="popupmenu_option"><a href="post.php?action=newthread&amp;fid=$fid&amp;extra=$extra&amp;modelid=$id">$model[name]</a></li>
		<!--{/loop}-->
	<!--{/if}-->
</ul>

<script type="text/javascript">
var maxpage = {if $maxpage}$maxpage{else}1{/if};
if(maxpage > 1) {
	document.onkeyup = function(e){
		e = e ? e : window.event;
		var tagname = is_ie ? e.srcElement.tagName : e.target.tagName;
		if(tagname == 'INPUT' || tagname == 'TEXTAREA') return;
		actualCode = e.keyCode ? e.keyCode : e.charCode;
		{if $page < $maxpage}
		if(actualCode == 39) {
			window.location = 'forumdisplay.php?fid=$fid$forumdisplayadd&page={echo $page+1;}';
		}
		{/if}
		{if $page > 1}
		if(actualCode == 37) {
			window.location = 'forumdisplay.php?fid=$fid$forumdisplayadd&page={echo $page-1;}';
		}
		{/if}
	}
}
function switchtab(total, current) {
	for(i = 1; i <= total;i++) {
		$('tab_' + i).className = '';
		$('tabc_' + i).style.display = 'none';
	}
	$('tab_' + current).className = 'current';
	$('tabc_' + current).style.display = '';
}
//loadselect('filtertype');
//loadselect('filterorder');
//loadselect('filtertime');
</script>

{subtemplate footer}
